import { UserConfig } from 'vitepress'
import { nav } from './config/nav'
import { sidebars } from './config/sidebars'
import { mdPlugin } from './config/plugins'

export const config: UserConfig = {
  title: 'twa-ui',
  description: '日常功能收集组件库',
  head: [ 
    [
      'meta',
      { name: 'referrer', content: 'no-referrer' }
    ],
  ],
  themeConfig: {
    sidebars: sidebars,
    nav: nav,
    // 目前用的element plus，对应的 algolia 搜索
    // https://docsearch.algolia.com/
    agolia: {
      apiKey: '99caf32e743ba77d78b095b763b8e380',
      appId: 'ZM3TI8AKL4',
    },
  },

  markdown: {
    config: (md) => mdPlugin(md),
  },
}

export default config
